-
Notifications
You must be signed in to change notification settings - Fork 1.1k
ci, gha: Add Windows jobs based on Linux image #1398
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Could you please explicitly enable the actions as follows:
? In the meantime, reviewers can view the builds in my personal repo: https://github.com/hebasto/secp256k1/actions/runs/5818492202. |
Caching doesn't seem to work properly. I suggest trying to remove the |
Which job? |
Sorry, all jobs, but I meant to include a link to the job. But I think I was wrong. The "Building container" stages takes ~5min, but all of this time seems to be spent downloading from the cache?! I didn't expect that it's that slow. edit: Fetching from ghcr is similarly slow, ok... https://github.com/hebasto/secp256k1/actions/runs/5783560280/job/15672591894#step:2:54 |
Correct.
That is what I meant in #1396 (comment) :) |
Okay! But do you agree with my observation that GHA cache vs. GHCR doesn't make a significant difference here? Then we can ignore that piece when deciding what to use for Linux tasks. (Heck, for Linux native tasks with standard gcc and clang, using Docker image at all may be faster... But I'd say let's worry about optimizations later.) |
I agree. The advantage of GHA cache over GHCR is not requiring write permissions for a workflow. |
Updated the actions settings |
2dc7abe
to
dba39d0
Compare
Reworked. The third-party |
Do you have permissions to re-run workflows and jobs? |
Hm, sad to see that it's already starting to get flaky: https://github.com/bitcoin-core/secp256k1/actions/runs/5827144103/job/15802793632?pr=1398 Perhaps this helps: moby/buildkit#3969 Anyway, I like the changes. |
From my experience, I would estimate the rate of such kind of failure is about 1 (one) per cent of total runs. |
dba39d0
to
ee8c2d7
Compare
Reworked with using a composite action to avoid environment variables hassles. Using |
The only thing I'm not sure about is that whether PR branches will hit image cache from the master branch. |
Okay, as @hebasto figured out that doesn't work with the GHA cache backend for now (see https://docs.docker.com/build/cache/backends/#cache-compression). Well fine. |
ee8c2d7
to
133c4e5
Compare
Dropped. |
This looks pretty clean now. Will perform a closer review soon. One nit: Perhaps it's now time to rename Some observations:
|
Done. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK mod nits
Do you think it makes sense to retain the Cirrus config commented out, like sometimes done in Core? This would require a bit more work here to make sure it still works now that we split the image.
for var in "$(echo '${{ toJSON(matrix.configuration.env_vars) }}' | jq -r 'to_entries | .[] | "\(.key)=\(.value)"')"; do | ||
echo "$var" >> "$GITHUB_ENV" | ||
done | ||
echo "MAKEFLAGS=-j$(($(nproc) + 1))" >> "$GITHUB_ENV" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: This will probably override MAKEFLAGS
if in env_vars
. Perhaps it's a bit cleaner to simply prepend MAKEFLAGS
with $(($(nproc) + 1))
, and do this inside ci.sh
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To keep the scope of this PR limited, is it OK to just set mingw_debian.env.MAKEFLAGS: '-j3'
?
UPD. Or rely on the global env.MAKEFLAGS: '-j4'
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or rely on the global
env.MAKEFLAGS: '-j4'
?
- run: cat tests.log || true | ||
if: ${{ always() }} | ||
- run: cat noverify_tests.log || true | ||
if: ${{ always() }} | ||
- run: cat exhaustive_tests.log || true | ||
if: ${{ always() }} | ||
- run: cat ctime_tests.log || true | ||
if: ${{ always() }} | ||
- run: cat bench.log || true | ||
if: ${{ always() }} | ||
- run: cat config.log || true | ||
if: ${{ always() }} | ||
- run: cat test_env.log || true | ||
if: ${{ always() }} | ||
- name: CI env | ||
run: env | ||
if: ${{ always() }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could this be refactored into an action? Or is this overkill?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could this be refactored into an action? Or is this overkill?
In that case it won't show separated entries in the log.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok yes, let's leave it like this for now.
(I'm not happy with this and it should be reworked in a separate PR. I had introduced this printing of files to make sure that we always have all logs, and I think that's a good idea in general. But it's not a good idea to pipe it only to files. We should pipe it to files but also keep stdout/stderr, e.g., using tee
. People get confused about this over and over because they can't find the error messages in the failing tasks etc.)
@MarcoFalke if you want to have a look |
9ade574
to
7f69b9a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Concept ACK, thanks @hebasto!
After @real-or-random explained this approach to me I was able to understand what happens without doing too much research into the github actions semantics. In general, it would be nice to have some comments that document what happens (e.g. what exactly is the purpose of docker_wine_cache
and what it does if the image already exists), but we can add them over time in follow-up PRs.
7f69b9a
to
716a009
Compare
Converting this PR to a draft for now. Please review #1401 first. |
716a009
to
eb2a483
Compare
Rebased. Ready for review. |
This makes sense in the process of moving stuff to GitHub Actions.
eb2a483
to
87d35f3
Compare
Rebased. |
I believe it's possible to shave off several minutes from the tasks that run in Docker by setting the docker build driver to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK 87d35f3
Unfortunately, GitHub Actions cache does not work with the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK 87d35f3
Solves one item in #1392 partially.